﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class Event : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var qs = Request.QueryString["More"];
        int News_number = int.Parse(qs);
        string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString;
        SqlConnection Conn = new SqlConnection(connectionString);
        SqlDataReader reader = null;
        SqlCommand cmd = new SqlCommand("SELECT News_Title,News_Entry,News_Description,News_Image FROM English_News Where ID = " + qs + " ORDER BY News_Date DESC", Conn);
        Conn.Open();
        reader = cmd.ExecuteReader();
        //for (int i = 0; i < News_number; i++)
        reader.Read();
        Title.Text = reader[0].ToString();
        Entry.Text = reader[1].ToString();
        Description.Text = reader[2].ToString();
        News_Image.ImageUrl = reader[3].ToString();
        reader.Close();
        Conn.Close();
    }
}
